package com.ruoyi.business.mapper;

import java.util.Date;
import java.util.List;
import com.ruoyi.business.domain.AchievementAwards;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

/**
 * 成果获奖Mapper接口
 * 
 * @author ruoyi
 * @date 2024-11-17
 */
@Mapper
public interface AchievementAwardsMapper 
{
    /**
     * 查询成果获奖
     * 
     * @param id 成果获奖主键
     * @return 成果获奖
     */
    public AchievementAwards selectAchievementAwardsById(Long id);

    /**
     * 查询成果获奖列表
     * 
     * @param achievementAwards 成果获奖
     * @return 成果获奖集合
     */
    public List<AchievementAwards> selectAchievementAwardsList(AchievementAwards achievementAwards);

    /**
     * 新增成果获奖
     * 
     * @param achievementAwards 成果获奖
     * @return 结果
     */
    public int insertAchievementAwards(AchievementAwards achievementAwards);

    /**
     * 修改成果获奖
     * 
     * @param achievementAwards 成果获奖
     * @return 结果
     */
    public int updateAchievementAwards(AchievementAwards achievementAwards);

    /**
     * 删除成果获奖
     * 
     * @param id 成果获奖主键
     * @return 结果
     */
    public int deleteAchievementAwardsById(Long id);

    /**
     * 批量删除成果获奖
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAchievementAwardsByIds(Long[] ids);


    @Delete("DELETE FROM t_achievement_Awards")
    void clearTable();

    @Delete("DELETE FROM t_achievement_Awards where DATE_FORMAT(award_year, '%Y') =  DATE_FORMAT(#{date}, '%Y')")
    void clearTableYear(Date date);
}
